package com.wx.service.impl;

import com.wx.dao.OrderDao;
import com.wx.dao.impl.OrderDaoImpl;
import com.wx.domain.Order;
import com.wx.service.OrderService;

import java.util.List;

public class OrderServiceImpl implements OrderService {

    OrderDao orderDao=new OrderDaoImpl();

    @Override
    public int save(int patientId, String doctorId, String dateTime) {
        return orderDao.save(patientId,doctorId,dateTime);
    }

    @Override
    public int getNumberBydoctorIdAndDateTime(String doctorId, String dateTime) {
        return orderDao.getNumberByDoctorIdAndDateTime(doctorId,dateTime);
    }

    @Override
    public List<Order> getOrderListByPatientId(String patientId) {
        return orderDao.getOrderListByPatientId(patientId);
    }

    @Override
    public List<Order> getOrderListByDoctorId(String doctorId) {
        return orderDao.getOrderListByDoctorId(doctorId);
    }

    @Override
    public List<Order> getOrderListByDoctorIdAndDateTime(String doctorId, String dateTime) {
        return orderDao.getOrderListByDoctorIdAndDateTime(doctorId,dateTime);
    }

    @Override
    public Order getOrderListByPatientIdAndDateTime(int patientId, String dateTime) {
        return orderDao.getOrderListByPatientIdAndDateTime(patientId,dateTime);
    }

    @Override
    public void updateHandle(int id,String orderId) {
        orderDao.updateHandle(id,orderId);
    }
}
